package com.gomro.galaxy.foundation.bi.controller;

import com.gomro.galaxy.core.commons.model.Result;
import com.gomro.galaxy.foundation.bi.api.CustomerTradeApi;
import com.gomro.galaxy.foundation.bi.domain.model.analysis.CustomerTradeVolume;
import com.gomro.galaxy.foundation.bi.query.CustomerTradeQuery;
import com.gomro.galaxy.foundation.bi.service.CustomerTradeService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
//客户交易控制器
/**
 * 客户交易记录controller
 *
 * @author ZhangLei
 */
@Slf4j
@RestController
@RequestMapping("customer/trade")
public class CustomerTradeController implements CustomerTradeApi {
    private final CustomerTradeService service;

    public CustomerTradeController(CustomerTradeService service) {
        this.service = service;
    }

    @Override
    public Result<List<CustomerTradeVolume>> page(CustomerTradeQuery query) {
        return service.page(query);
    }
}
